﻿@{
    ViewData["Title"] = "Index";
    Layout = "~/Areas/Console/Views/Shared/_Layout.cshtml";
}
@section head{
    <script type="text/javascript">
        var wireTransfer, remittanceAccount, cryptoCurrency
        var fromCurrency, withdrawCurrency
        var channelId
        var mothod = 1
        var price
        var renderTable;
        var userType = 0;
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            treetable: 'treetable-lay/treetable',
            index: 'lib/index',
            qrcode: 'qrcode/qrcode'
        }).use(['table', 'form', 'treetable', 'index', 'upload', 'qrcode'], function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , upload = layui.upload
                , table = layui.table
                , element = layui.element
                , treetable = layui.treetable;
            top.SetListPageLanguage(layui);

            $("#addWireTransfer").click(function () {
                top.OpenPageByKey(layui, "addWireTransfer", 2, '90%', '90%', '/Withdraw/CreateWireTransfer');
            });

            $("#editWireTransfer").click(function () {
                top.OpenPageByKey(layui, "editWireTransfer", 2, '90%', '90%', '/Withdraw/EditWireTransfer?id=' + $("#wireTransferId").val());
            });

            $("#delWireTransfer").click(function () {
                var postData = {
                    id: $("#wireTransferId").val()
                };
                top.ConfirmByKey(layui, 'confirmDelete', postData, "/Withdraw/DeleteWireTransfer", "POST", "deleteSuccess", "deleteFail", function () {
                    parent.location.reload();
                });
            });

            $("#addRemittanceAccount").click(function () {
                top.OpenPageByKey(layui, "addRemittanceAccount", 2, '90%', '90%', '/Withdraw/CreateRemittanceAccount');
            });

            $("#editRemittanceAccount").click(function () {
                top.OpenPageByKey(layui, "editRemittanceAccount", 2, '90%', '90%', '/Withdraw/EditRemittanceAccount?id=' + $("#remittanceAccountId").val());
            });

            $("#delRemittanceAccount").click(function () {
                var postData = {
                    id: $("#remittanceAccountId").val()
                };
                top.ConfirmByKey(layui, 'confirmDelete', postData, "/Withdraw/DeleteRemittanceAccount", "POST", "deleteSuccess", "deleteFail", function () {
                    parent.location.reload();
                });
            });

            $("#addCryptoCurrency").click(function () {
                top.OpenPageByKey(layui, "addCryptoCurrency", 2, '90%', '90%', '/Withdraw/CreateCryptocurrency');
            });

            $("#editCryptoCurrency").click(function () {
                top.OpenPageByKey(layui, "editCryptoCurrency", 2, '90%', '90%', '/Withdraw/EditCryptocurrency?id=' + $("#cryptoCurrencyId").val());
            });

            $("#delCryptoCurrency").click(function () {
                var postData = {
                    id: $("#cryptoCurrencyId").val()
                };
                top.ConfirmByKey(layui, 'confirmDelete', postData, "/Withdraw/DeleteCrmCryptocurrency", "POST", "deleteSuccess", "deleteFail", function () {
                    parent.location.reload();
                });
            });

            //电汇账户开始
            function GetCrmWireTransfer() {
                $.getJSON("/Withdraw/CrmWireTransfer", function (result) {
                    let plat = result.data;
                    wireTransfer = result.data;
                    $("#wireTransferCurrency").empty();
                    $('#wireTransferCurrency').append(new Option(top.lang.pleaseSelect, ""));
                    plat.forEach(function (v) {
                        $('#wireTransferCurrency').append(new Option(v.bank, v.id));
                    });
                    if (result.data.length > 0) {
                        channelId = $('select[name="wireTransferCurrency"] option:selected').val();
                        $('#wireTransferCurrencyCard').show()
                        $('#wireTransferId').val(wireTransfer[0].id)
                        $('#payee').html(wireTransfer[0].payee);
                        $('#payeenumber').html(wireTransfer[0].accountNumber);
                        $('#payeeaddress').html(wireTransfer[0].payeeAddress);
                        $('#payeebank').html(wireTransfer[0].bank);
                        $('#swiftcode').html(wireTransfer[0].swiftcode);
                        $('#bankaddress').html(wireTransfer[0].bankAddress);
                        $('#collectionAccount').html(wireTransfer[0].bank)
                        channelId = wireTransfer[0].id
                          $('#withdrawForm').show()
                    }
                    else {
                        $('#wireTransferCurrencyCard').hide()
                        $('#withdrawForm').hide()
                    }
                    layui.form.render("select");
                });
            }
            GetCrmWireTransfer();

            form.on('select(wireTransferCurrency)', function (data) {
                wireTransfer.forEach(function (v) {
                    if (v.id == data.value) {
                        $("#wireTransferId").val(v.id)
                        $('#payee').html(v.payee);
                        $('#payeenumber').html(v.accountNumber);
                        $('#payeeaddress').html(v.payeeAddress);
                        $('#payeebank').html(v.bank);
                        $('#swiftcode').html(v.swiftcode);
                        $('#bankaddress').html(v.bankAddress);
                        $('#collectionAccount').html(v.bank)
                        channelId = v.id
                    }
                });
                form.render();
            });
            //电汇账户结束

            //汇款账户开始
            function GetCrmRemittanceAccount() {
                $.getJSON("/Withdraw/CrmRemittanceAccount", function (result) {
                    let plat = result.data;
                    remittanceAccount = result.data;
                     $("#remittanceAccountCurrency").empty();
                     $('#remittanceAccountCurrency').append(new Option(top.lang.pleaseSelect, ""));
                    plat.forEach(function (v) {
                        $('#remittanceAccountCurrency').append(new Option(v.bank, v.id));
                    });
                    if (result.data.length > 0) {
                         channelId = $('select[name="remittanceAccountCurrency"] option:selected').val();
                        $('#remittanceAccountCurrencyCard').show()
                        $('#remittanceAccountId').val(remittanceAccount[0].id);
                        $('#accountname').html(remittanceAccount[0].payee);
                        $('#accountnumber').html(remittanceAccount[0].accountNumber);
                        $('#bank').html(remittanceAccount[0].bank);
                        $('#branchname').html(remittanceAccount[0].branchName);
                        $('#qrcode').attr("src", remittanceAccount[0].qrcode);
                        $('#collectionAccount').html(remittanceAccount[0].bank)
                            channelId = remittanceAccount[0].id
                          $('#withdrawForm').show()
                    }
                    else {
                        $('#remittanceAccountCurrencyCard').hide()
                           $('#withdrawForm').hide()
                    }
                    layui.form.render("select");
                });
            }

            form.on('select(remittanceAccountCurrency)', function (data) {
                remittanceAccount.forEach(function (v) {
                    if (v.id == data.value) {
                        $("#remittanceAccountId").val(v.id)
                        $('#accountname').html(v.payee);
                        $('#accountnumber').html(v.accountNumber);
                        $('#bank').html(v.bank);
                        $('#branchname').html(v.branchName);
                        $('#qrcode').attr("src", v.qrcode);
                        $('#collectionAccount').html(v.bank)
                        channelId = v.id
                    }
                });
                form.render();
            });
            //汇款账户结束

            //加密货币开始
            function GetCrmCryptocurrency() {
                $.getJSON("/Withdraw/CrmCryptocurrency", function (result) {
                    let plat = result.data;
                    cryptoCurrency = result.data;
                    $("#cryptoCurrency").empty();
                    $('#cryptoCurrency').append(new Option(top.lang.pleaseSelect, ""));
                    plat.forEach(function (v) {
                        $('#cryptoCurrency').append(new Option(v.currency, v.id));
                    });
                    if (result.data.length > 0) {
                        channelId = $('select[name="cryptoCurrency"] option:selected').val();
                        $('#cryptoCurrencyCard').show()
                        $("#cryptoCurrencyId").val(cryptoCurrency[0].id)
                        $('#network').html(cryptoCurrency[0].network);
                        $('#receivingaddress').html(cryptoCurrency[0].receivingAddress);
                        $('#ccqrcode').empty();
                        $('#ccqrcode').qrcode({
                            render: "canvas",  //table
                            width: 96,
                            height: 96,
                            text: cryptoCurrency[0].receivingAddress
                        });
                        channelId = cryptoCurrency[0].id
                        $('#collectionAccount').html(cryptoCurrency[0].network)
                        $('#withdrawForm').show()
                    }
                    else {
                        $('#cryptoCurrencyCard').hide()
                        $('#withdrawForm').hide()
                    }
                    layui.form.render("select");
                });
            }

            form.on('select(cryptoCurrency)', function (data) {
                cryptoCurrency.forEach(function (v) {
                    if (v.id == data.value) {
                        $("#cryptoCurrencyId").val(v.id)
                        $('#network').html(v.network);
                        $('#receivingaddress').html(v.receivingAddress);
                        $('#ccqrcode').empty();
                        $('#ccqrcode').qrcode({
                            render: "canvas",  //table
                            width: 96,
                            height: 96,
                            text: v.receivingAddress
                        });
                        $('#collectionAccount').html(v.network)
                        channelId = v.id
                    }
                });
                form.render();
            });
            //加密货币结束

            //TAB切换
            element.on('tab(withdraw)', function (elem) {
                var selectVal;
                mothod = elem.index + 1
                if (elem.index == 0) {
                    GetCrmWireTransfer()
                }
                else if (elem.index == 1) {
                    GetCrmRemittanceAccount()
                }
                else if (elem.index == 2) {
                    GetCrmCryptocurrency()
                }
            });

            //出金提交
            form.on('submit(submitWithdraw)', function (data) {
                //var channelId = $("#wireTransferCurrency option:selected").val()
                //var mothod = mothod
                var withdrawamount = $("#withdrawamount").val().trim().replace(/,/g, '');
                var password = $("#password").val()
                var remarks = $("#remark").val()
                if (withdrawamount === "") {
                    top.ShowMessageByKey(layui, top.lang.withdrawAmountError, 0, 1000);
                    return false;
                }
                layui.layer.confirm(top.lang.confirmWithdrwa + "$" + withdrawamount, {
                    title: top.lang.confirmTitle,
                    btn: [top.lang.confirmBtn, top.lang.closeBtn]
                }, function (index, layero) {
                    $.ajax({
                        type: "POST",
                        url: "/Withdraw/Withdraw",
                        data: {
                            "channelId": channelId,
                            "mothod": mothod,
                            "withdrawamount": withdrawamount,
                            "password": password,
                            "remarks": remarks,
                        },
                        async: true,
                        error: function (request) {
                            alert("Connection error");
                        },
                        beforeSend: function (xhr) {
                            layui.layer.load();
                        },
                        success: function (data) {
                            var item = eval(data);
                            if (item.code == 0) {
                                top.ShowMessageByKey(layui, item.msg, 6, 1000, function () {
                                    location.reload();
                                });
                            } else {
                                top.ShowMessageByKey(layui, item.msg, 0, 1000);
                            }
                            layer.closeAll('loading');
                        }
                    });
                });
                return false;
            });

            $("#gotoSetTradePassword").click(function () {
                parent.layui.index.openTabsPage("/Personal/TradePassword");
                //初始化导航选项卡（选中新建标签卡）
                parent.layui.element.render('nav');
            });

            $("#gotoSetFinancial").click(function () {
                parent.layui.index.openTabsPage("/Personal/Index");
                //初始化导航选项卡（选中新建标签卡）
                parent.layui.element.render('nav');
            });

            //图片预览事件
            $('#qrcode').click(function (e) {
                previewImg(this);
                e.stopPropagation()
            });

            $('#withdrawamount').keyup(function () {
                var mt5Balance = Number($("#mt5Balance").html().replace(/,/g, ''))
                var withdrawamount = $('#withdrawamount').val().trim().replace(/,/g, '');
                if (withdrawamount > mt5Balance) {
                    $('#availableAmount').show();
                }
                else {
                    $('#availableAmount').hide();
                }
            });

            //图片预览事件
            $('#ccqrcode').click(function () {
                var url = $('#receivingaddress').html()
                var tempInput = $("<div style='overflow:auto;display:flex;align-items:center;justify-content:center;max-width: 100%;max-height: 100%'><div id='showqrcode' style='max-width: 100%;max-height: 100%;position: absolute;top: 50%;transform: translateY(-50%);'></div></div>");
                $("body").append(tempInput);

                $('#showqrcode').qrcode({
                    render: "canvas", //也可以替换为table
                    width: 200,
                    height: 200,
                    text: url
                });
                //弹出层
                layer.open({
                    type: 1,
                    shade: true,
                    shade: [0.4, '#000000'],
                    title: false, //不显示标题
                    area: ['70%', '70%'],
                    //maxWidt: 360,
                    //maxHeight: 360,
                    content: tempInput,
                    cancel: function () {
                        tempInput.remove();
                    }
                });
            });
      
          //光标离开输入的金额四舍五入并保留4位小数
            $("#withdrawamount").blur(function () {
                var obj = this.value;
                var mnyReg = /^([1-9][0-9]*|(([0]\.[0-9]{0,2}[1-9]\d*|[1-9][0-9]*\.\d*)))$/;//根据需求修改
                if (!(mnyReg.test(obj))) {
                    top.AlertByKey(layui, "enterNotIsNumber", 0);
                    return;
                }
                var n = 2; //保留得小数位
                obj = parseFloat(obj).toFixed(n);
                var left = obj.split(".")[0].split("").reverse();
                var right = obj.split(".")[1];
                var total = new Array();
                for (i = 0; i < left.length; i++) {
                    total.push(left[i]);
                    if ((i + 1) % 3 == 0 && (i + 1) != left.length) {
                        total.push(",");
                    }
                }
                $("#withdrawamount").val(total.reverse().join("") + "." + right);
            });

            //光标进入，去除金额千分位，并去除小数后面多余的0
            $("#withdrawamount").focus(function () {
                var oldMny = this.value.replace(/,/g, '');
                if (oldMny.indexOf(".") > 0) {
                    oldMny = oldMny.replace(/0+?$/, "");//去除尾部多余的0
                    oldMny = oldMny.replace(/[.]$/, "");//如果最后一位是.则去掉
                }
                this.value = oldMny;
            });
        });
    </script>
}
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
        @if (ViewBag.hasMt5User)
        {
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" style="text-align:center;">
                        <blockquote class="layui-elem-quote" id="setPersonal" lay-event="setPersonal">请先完善您的个人信息</blockquote>
                        <button type="button" class="layui-btn" id="gotoSetPersonal" lay-event="gotoSePersonal">立即前往</button>
                    </div>
                </div>
            </div>
        }
        else
        {
            @if (ViewBag.noFinancial)
            {
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body" style="text-align:center;">
                            <blockquote class="layui-elem-quote" id="setFinancial" lay-event="setFinancial">请先完善您的财务认证</blockquote>
                            <button type="button" class="layui-btn" id="gotoSetFinancial" lay-event="gotoSetFinancial">立即前往</button>
                        </div>
                    </div>
                </div>
            }
            else
            {
                @if (ViewBag.noTradePassword)
                {
                    <div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-body" style="text-align:center;">
                                <blockquote class="layui-elem-quote" id="setTradePassword" lay-event="setTradePassword">请先设置您的资金密码</blockquote>
                                <button type="button" class="layui-btn" id="gotoSetTradePassword" lay-event="gotoSetTradePassword">立即前往</button>
                            </div>
                        </div>
                    </div>
                }
                else
                {
                    <div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-body">
                                <div class="layui-tab layui-tab-brief" lay-filter="withdraw">
                                    <ul class="layui-tab-title">
                                        <li lay-event="wireTransfer" class="layui-this">电汇账户</li>
                                        <li lay-event="remittanceAccount">汇款账户</li>
                                        <li lay-event="cryptoCurrency">数字货币</li>
                                    </ul>
                                    <div class="layui-tab-content" style="padding-top:0;">
                                        <div class="layui-tab-item layui-show">
                                            <form class="layui-form">
                                                <div class="layui-form-item" style="float:right;">
                                                    <button type="button" class="layui-btn layui-btn-sm add-withdraw" id="addWireTransfer" lay-event="addWireTransfer">添加电汇账户</button>
                                                </div>
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label" lay-event="paymentMethod" style="width:100px;">提现方式</label>
                                                    <div class="layui-input-block" style="margin-left:130px;">
                                                        <select name="wireTransferCurrency" id="wireTransferCurrency" lay-filter="wireTransferCurrency">
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="layui-card withdraw-card" id="wireTransferCurrencyCard">
                                                    <div class="layui-card-header" style="text-align: right;">
                                                        <div class="layui-btn-group">
                                                            <button type="button" class="layui-btn layui-btn-sm" id="editWireTransfer"  lay-event="edit">编辑</button>
                                                            <button type="button" class="layui-btn layui-btn-sm" id="delWireTransfer"  lay-event="delete">删除</button>
                                                        </div>
                                                    </div>
                                                    <div class="layui-card-body" style="padding: 10px 0;">
                                                        <div class="layui-row">
                                                            <input type="hidden" id="wireTransferId">
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wpayeetitle" style="width:100px;">提现户名</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="payee" id="payee"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wpayeenumbertitle" style="width:100px;">提现账户</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="payeenumber" id="payeenumber"></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="layui-row">
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="payeeaddresstitle" style="width:100px;">联邦清算号</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="payeeaddress" id="payeeaddress"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wpayeebanktitle" style="width:100px;">提现银行</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="payeebank" id="payeebank"></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="layui-row">
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="swiftcodetitle" style="width:100px;">SWIFT Code</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="swiftcode" id="swiftcode"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wbankaddresstitle" style="width:100px;">提现银行地址</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="bankaddress" id="bankaddress"></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        <div class="layui-tab-item">
                                            <form class="layui-form">
                                                <div class="layui-form-item" style="float:right;">
                                                    <button type="button" class="layui-btn layui-btn-sm add-withdraw" id="addRemittanceAccount"  lay-event="addRemittanceAccount">添加汇款账户</button>
                                                </div>
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label" lay-event="currencytitle" style="width:100px;">收款货币</label>
                                                    <div class="layui-input-block" style="margin-left:130px;">
                                                        <select name="remittanceAccountCurrency" id="remittanceAccountCurrency" lay-filter="remittanceAccountCurrency">
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="layui-card withdraw-card" id="remittanceAccountCurrencyCard">
                                                    <div class="layui-card-header" style="text-align: right;">
                                                        <div class="layui-btn-group">
                                                            <button type="button" class="layui-btn layui-btn-sm" id="editRemittanceAccount"   lay-event="edit">编辑</button>
                                                            <button type="button" class="layui-btn layui-btn-sm" id="delRemittanceAccount"   lay-event="delete">删除</button>
                                                        </div>
                                                    </div>
                                                    <div class="layui-card-body">
                                                        <div class="layui-row">
                                                            <input type="hidden" id="remittanceAccountId">
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="waccountnametitle" style="width:100px;">提现户名</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="accountname" id="accountname"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="waccouwntnumbertitle" style="width:100px;">提现账户</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="accountnumber" id="accountnumber"></label>
                                                                </div>
                                                            </div>
                                                            @*</div>*@
                                                            @*                                                 <div class="layui-row">*@
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wbanktitle" style="width:100px;">提现银行</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="bank" id="bank"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wbranchnametitle" style="width:100px;">提现支行</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="branchname" id="branchname"></label>
                                                                </div>
                                                            </div>
                                                            @*                                                    </div>
                                                <div class="layui-row">*@
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wqrcodetitle" style="width:100px;">提现二维码</label>
                                                                    <img class="head-img" name="qrcode" id="qrcode" width="96" height="96">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        <div class="layui-tab-item">
                                            <form class="layui-form">
                                                <div class="layui-form-item" style="float:right;">
                                                    <button type="button" class="layui-btn layui-btn-sm add-withdraw" id="addCryptoCurrency" lay-event="addCryptoCurrency">添加数字货币</button>
                                                </div>
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label" lay-event="currencytitle" style="width:100px;">收款货币</label>
                                                    <div class="layui-input-block" style="margin-left:130px;">
                                                        <select name="cryptoCurrency" id="cryptoCurrency" lay-filter="cryptoCurrency">
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="layui-card withdraw-card" id="cryptoCurrencyCard">
                                                    <div class="layui-card-header" style="text-align: right;">
                                                        <div class="layui-btn-group">
                                                            <button type="button" class="layui-btn layui-btn-sm" id="editCryptoCurrency"  lay-event="edit">编辑</button>
                                                            <button type="button" class="layui-btn layui-btn-sm" id="delCryptoCurrency" lay-event="delete">删除</button>
                                                        </div>
                                                    </div>
                                                    <div class="layui-card-body">
                                                        <div class="layui-row">
                                                            <input type="hidden" id="cryptoCurrencyId">
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="networktitle" style="width:100px;">区块链网络</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name=" " id="network"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="receivingaddresstitle" style="width:100px;">提现地址</label>
                                                                    <label class="form-label" style="padding-left:0px; text-align:left;" name="receivingaddress" id="receivingaddress"></label>
                                                                </div>
                                                            </div>
                                                            <div class="layui-col-xs12 layui-col-md6">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label" lay-event="wqrcodetitle" style="width:100px;">提现二维码</label>
                                                                    <div class="head-img" name="ccqrcode" id="ccqrcode"></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
                                </fieldset>
                                <form class="layui-form" id="withdrawForm">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label" lay-event="collectionAccount" style="width:100px;">收款账户</label>
                                        <div class="layui-input-block" style="margin-left:130px;">
                                            <label class="form-label  mt5user" id="collectionAccount" name="collectionAccount"></label>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label" lay-event="mt5usertitle" style="width:100px;">MT5账号</label>
                                        <div class="layui-input-block" style="margin-left:130px;">
                                            <label class="layui-form-label  mt5user" id="mt5user" name="mt5user" lay-event="mt5user">@ViewBag.login</label>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label" lay-event="mt5Balance" style="width:100px;">可用金额</label>
                                        <div class="layui-input-block" style="margin-left:130px;">
                                            <label class="form-label mt5user" id="mt5Balance" name="mt5Balance">@ViewBag.mt5Balance</label>
                                            <label class="form-label mt5user" style="display:inline-block"> USD</label>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-group">
                                            <div class="layui-input-prefix" lay-event="withdrawamounttitle">提现金额</div>
                                            <input type="text" placeholder="" class="layui-input" id="withdrawamount" name="withdrawamount">
                                            <div class="layui-input-split layui-input-suffix" id="withdrawcurrency" name="withdrawcurrency">
                                                USD
                                            </div>
                                            <label style="display:inline-block;display:none; padding:0 10px;color:red;" id="availableAmount" name="availableAmount" lay-event="availableAmount">出金金额不能大于可用金额</label>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-group">
                                            <div class="layui-input-prefix" id="feesTitle" lay-event="feesTitle">手续费</div>
                                            <label class="form-label" style="padding-left:0px; text-align:left;" name="withdrawFeestip" id="withdrawFeestip" lay-event="withdrawFeestip">提现手续费将以实际为准，从提现金额中扣除</label>
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label class="layui-form-label" style="width:100px;"  id="tradePwd" lay-event="tradePwd">资金密码</label>
                                        <div class="layui-input-block" style="margin-left:130px;">
                                            <input type="password" autocomplete="off" placeholder="资金密码" class="layui-input" id="password">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label" style="width:100px;" lay-event="remark">备注</label>
                                        <div class="layui-input-block" style="margin-left:130px;">
                                            <input type="text" autocomplete="off" placeholder="备注" class="layui-input" id="remark">
                                        </div>
                                    </div>
                                    <div class="tips">@Html.Raw(ViewBag.withdrawalWarmPrompt)</div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-block" style="margin-left:130px;">
                                            <button type="submit" class="layui-btn" lay-submit lay-filter="submitWithdraw">立即提交</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                }
            }
        }
    </div>
</div>